Skip to content

ci: route the SDK release install through the internal Verdaccio cache - #4426

Merged
evereq merged 3 commits into
developfrom
ci/verdaccio-configure-registry
Aug 21, 2026
Merged

evereq merged 3 commits into
developfrom
ci/verdaccio-configure-registry

Conversation

@evereq

@evereq evereq commented Aug 21, 2026

Copy link
Copy Markdown
Member

Part of the fleet-wide Verdaccio rollout (owner goal: traffic reduction — all repos resolve npm installs through the internal cache on self-hosted runners).

Uses the shared action ever-co/ever-gauzy/.github/actions/configure-registry pinned to 9459d29e (ever-co/ever-gauzy#10029), which probes the VIP and falls back to npmjs quietly on any runner that cannot reach it — GitHub-hosted fallback runs are unaffected.

Per-job decisions:

  • release.sdk.prod.ymlrelease (RUNNER_LINUX_X64_4): Configure Registry added before yarn install --frozen-lockfile (yarn repo → the yarn.lock rewrite is load-bearing; --frozen-lockfile tolerates the registry-host rewrite because integrity hashes are unchanged).
  • Paired restore step immediately after the install (if: always()): this workflow later runs git add . + git push (changeset version bumps) and then publishes to npmjs. A rewritten yarn.lock or the registry lines the action appends to the tracked .npmrc/.yarnrc must never be committed or influence yarn publish — the restore puts every tracked file back (yarn.lock, .npmrc, .yarnrc) and removes untracked leftovers before any build/version/publish step runs.

Only the install itself flows through the cache; the publish path (auth via ~/.npmrc + NODE_AUTH_TOKEN) is byte-identical to today.

🤖 Generated with Claude Code


Summary by cubic

Routes the SDK release job’s dependency install through the internal Verdaccio cache to reduce external npm traffic. Previously installs always hit npmjs; now they use the cache when reachable and fall back to npmjs. Publish behavior is unchanged.

  • Adds Configure Registry before yarn install --frozen-lockfile in .github/workflows/release.sdk.prod.yml, using ever-co/ever-gauzy/.github/actions/configure-registry (now pinned to a version with an errexit-guarded tracked-file probe). The action probes the VIP and silently falls back to npmjs when unreachable.
  • Adds a restore step (if: always()) immediately after install to revert any yarn.lock rewrite and remove registry lines from tracked .npmrc/.yarnrc, preventing accidental commits and ensuring yarn publish uses npmjs via ~/.npmrc and NODE_AUTH_TOKEN.
  • Updates .cspell.json to include yarnrc and USERCONFIG to avoid false positives in CI.

Written for commit eee7f23. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Improved release workflow reliability for package publishing.
    • Added safeguards to restore registry settings after dependency installation, helping ensure consistent versioning and publishing.
    • Updated project tooling to recognize additional registry configuration terms.

Adds the shared pinned ever-co/ever-gauzy configure-registry action before
yarn install in release.sdk.prod.yml, paired with a restore step right after
the install: this workflow later runs git add . + push (changeset version
bumps) and publishes to npmjs, so the rewritten yarn.lock and the appended
registry lines in the tracked .npmrc/.yarnrc must never survive past the
install. Restore puts tracked files back and removes untracked leftovers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 21, 2026 16:33
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e8a175a-ba1b-4e80-8be4-4fb8706051fb

📥 Commits

Reviewing files that changed from the base of the PR and between ec32f32 and eee7f23.

📒 Files selected for processing (1)
  • .github/workflows/release.sdk.prod.yml

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


Walkthrough

The production SDK release workflow configures Verdaccio before dependency installation. An always-run cleanup step restores registry-related files and removes generated rewrite artifacts. The spellchecker allows the new registry terms.

Changes

SDK production registry lifecycle

Layer / File(s) Summary
Registry setup and cleanup
.github/workflows/release.sdk.prod.yml, .cspell.json
The workflow invokes the pinned configure-registry action with Verdaccio settings before installation. After Yarn installation, it restores tracked registry files, removes untracked copies, and deletes rewritten lockfiles. The spellchecker allows yarnrc and USERCONFIG.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to eee7f

The release install now uses the internal cache and then restores repository files before publishing. Mergeable with owner follow-up to confirm that the active npm configuration is restored to npmjs and that all rewritten lockfile artifacts are safely handled before automated commits.

Poem

A rabbit sets the registry right,
Then guards the files through day and night.
Verdaccio guides the packages through,
Cleanup makes the checkout new.
Hop, hop—release dreams come true!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main workflow change: routing the SDK release installation through the internal Verdaccio cache.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/verdaccio-configure-registry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SDK release workflow to route dependency installation through the internal Verdaccio cache while preserving npmjs publishing.

Changes:

  • Adds the pinned registry configuration action before installation.
  • Restores lockfile and registry files before build and publish.
  • Critical: The cross-repository action can access the publish credential inherited via NODE_AUTH_TOKEN; authentication must be scoped or isolated.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +67 to +71
- name: Configure Registry
uses: ever-co/ever-gauzy/.github/actions/configure-registry@9459d29e9a3859740348bb445dfe885cae83fc88
with:
verdaccio-registry: ${{ vars.VERDACCIO_REGISTRY }}
verdaccio-token: ${{ secrets.VERDACCIO_TOKEN }}
@socket-security

socket-security Bot commented Aug 21, 2026

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.sdk.prod.yml">

<violation number="1" location=".github/workflows/release.sdk.prod.yml:68">
P2: The Configure Registry action deletes this repository's tracked `.yarnrc` before `yarn install`, so the install ignores the pinned `yarn-path` and runs the runner's global Yarn version. Use an action revision that preserves existing `.yarnrc` settings, or merge the registry entry with the existing file before installing.</violation>

<violation number="2" location=".github/workflows/release.sdk.prod.yml:68">
P1: `Configure Registry` runs after the workflow writes the publish token to `~/.npmrc`, while job-level `NODE_AUTH_TOKEN` is inherited by this action. Move it before authentication and scope the token to only the install and publish steps.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/release.sdk.prod.yml Outdated
echo "✅ NPM authentication configured"

- name: Configure Registry
uses: ever-co/ever-gauzy/.github/actions/configure-registry@9459d29e9a3859740348bb445dfe885cae83fc88

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Configure Registry runs after the workflow writes the publish token to ~/.npmrc, while job-level NODE_AUTH_TOKEN is inherited by this action. Move it before authentication and scope the token to only the install and publish steps.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.sdk.prod.yml, line 68:

<comment>`Configure Registry` runs after the workflow writes the publish token to `~/.npmrc`, while job-level `NODE_AUTH_TOKEN` is inherited by this action. Move it before authentication and scope the token to only the install and publish steps.</comment>

<file context>
@@ -64,9 +64,35 @@ jobs:
           echo "✅ NPM authentication configured"
 
+      - name: Configure Registry
+        uses: ever-co/ever-gauzy/.github/actions/configure-registry@9459d29e9a3859740348bb445dfe885cae83fc88
+        with:
+          verdaccio-registry: ${{ vars.VERDACCIO_REGISTRY }}
</file context>

Comment thread .github/workflows/release.sdk.prod.yml Outdated
echo "✅ NPM authentication configured"

- name: Configure Registry
uses: ever-co/ever-gauzy/.github/actions/configure-registry@9459d29e9a3859740348bb445dfe885cae83fc88

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The Configure Registry action deletes this repository's tracked .yarnrc before yarn install, so the install ignores the pinned yarn-path and runs the runner's global Yarn version. Use an action revision that preserves existing .yarnrc settings, or merge the registry entry with the existing file before installing.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.sdk.prod.yml, line 68:

<comment>The Configure Registry action deletes this repository's tracked `.yarnrc` before `yarn install`, so the install ignores the pinned `yarn-path` and runs the runner's global Yarn version. Use an action revision that preserves existing `.yarnrc` settings, or merge the registry entry with the existing file before installing.</comment>

<file context>
@@ -64,9 +64,35 @@ jobs:
           echo "✅ NPM authentication configured"
 
+      - name: Configure Registry
+        uses: ever-co/ever-gauzy/.github/actions/configure-registry@9459d29e9a3859740348bb445dfe885cae83fc88
+        with:
+          verdaccio-registry: ${{ vars.VERDACCIO_REGISTRY }}
</file context>

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The release workflow now configures the shared Verdaccio registry before installing dependencies, then restores registry-related checkout files before building and publishing SDK packages.

The cleanup behavior was exercised in an isolated Git worktree with simulated registry mutations and a forced dependency-install failure. The cleanup ran afterward, restored yarn.lock, .npmrc, and .yarnrc, removed rewritten lockfile artifacts, and left the worktree clean. This disproves the concern that registry configuration changes survive a failed install.

Confidence Score: 5/5

The release workflow safely isolates temporary registry configuration to dependency installation and restores the checkout before build and publication steps.

The changed failure path was exercised with a forced install failure, and the exact cleanup commands restored tracked files and removed the temporary rewritten artifacts.

Files Needing Attention: No files need further attention.

T-Rex T-Rex Logs

What T-Rex did

  • Validated that registry restoration follows Yarn install, precedes the build step, and runs under always() in the release.sdk.prod workflow.
  • In an isolated Git worktree, simulated a failed yarn install by mutating yarn.lock, .npmrc, and .yarnrc, created rewritten artifacts, and forced the install to exit with status 1.
  • Executed the workflow's exact cleanup body after the failed install and observed that git status was clean and the rewritten artifacts were removed.
  • Before cleanup, three tracked files remained modified and both rewritten artifacts existed; after cleanup, git status was empty and the rewritten artifacts were absent, with the implementation located at the specified workflow file region.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "ci: route the SDK release install throug..." | Re-trigger Greptile

…file probe)

The previous pin died silently (exit 1, no output) on repos where .npmrc/
yarn.lock/package-lock.json are untracked - composite bash -e killed the
bare 'git ls-files; tracked=$?' probe. Fixed upstream in ever-co/ever-gauzy#10029.
@sonarqubecloud

Copy link
Copy Markdown

@evereq

evereq commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

Note on the red License Compliance (FOSSA) check: it is pre-existing and unrelated — the same check fails on the other currently-open PRs (#4424, #4423, each "1 issues found" against the main FOSSA project) and this PR touches only a workflow file + two cspell dictionary words, which cannot alter dependency licensing. Every other check passes.

@evereq
evereq merged commit 805b75b into develop Aug 21, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants